package cn.yunhe.dplayerdemo3.util;

import cn.yunhe.dplayerdemo3.entity.Danmup;
import com.alibaba.fastjson.JSON;


import javax.websocket.EncodeException;
import javax.websocket.Encoder;
import javax.websocket.EndpointConfig;

public class ServerEncode implements Encoder.Text<Danmup> {
    @Override
    public String encode(Danmup danmup) throws EncodeException {
        return JSON.toJSONString(danmup);
    }

    @Override
    public void init(EndpointConfig endpointConfig) {
    }

    @Override
    public void destroy() {

    }
}
